#include <stdio.h>
#include "ResManager/res_manager.h"
#include "GdiplusHelper/ScreenShotHelper.h"

int main()
{
    ResManager::Instance().SetResourcePath(L"C:\\Users\\tyter\\Desktop");

    Gdiplus::Image* pImg = NULL;
    HBITMAP hBitmap;
    BOOL bRet = ResManager::Instance().LoadBmpFromResourceID(L"LOFTER_files\\tt", hBitmap);
    if (!bRet)
    {
        return 0;
    }

    HDC hdc = ::GetDC(NULL);

    BITMAP bmp;
    GetObject((HGDIOBJ)hBitmap, sizeof(BITMAP), (LPBYTE)&bmp);

    int nWidth = bmp.bmWidth;
    int nHeight = bmp.bmHeight;

    HDC hDc = ::CreateCompatibleDC(hdc);
    HBITMAP hOld = (HBITMAP)::SelectObject(hDc, (HGDIOBJ)hBitmap);

    ::BitBlt(hdc, 0, 0, nWidth, nHeight, hDc, 0, 0, SRCCOPY);

    ::SelectObject(hDc, (HGDIOBJ)hOld);
    ::DeleteDC(hDc);
    ::ReleaseDC(NULL, hdc);

    return 0;
}